package pers.cj.pdos.mapper;

import org.apache.ibatis.annotations.Param;
import pers.cj.pdos.entity.SettAccount;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import pers.cj.pdos.vo.SettAccountVo;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author chenj
 * @since 2019-11-04
 */
public interface SettAccountMapper extends BaseMapper<SettAccount> {
    List<SettAccountVo> listVo(@Param("page") Integer page,
                               @Param("limit") Integer limit,
                               @Param("companyId") String companyId,
                               @Param("search") String search,
                               @Param("storeId") String storeId);

    long count(@Param("companyId")String companyId, @Param("search")String search,@Param("storeId") String storeId);

    List<SettAccountVo> listVoForInit(@Param("page") Integer page,
                               @Param("limit") Integer limit,
                               @Param("companyId") String companyId,
                               @Param("search") String search);

    long countForInit(@Param("companyId")String companyId, @Param("search")String search);


    SettAccountVo getVoById(String id);

    void addBalance(@Param("balance") BigDecimal balance, @Param("id") String id);

    BigDecimal getTotalBalance(@Param("companyId") String companyId);
}
